package com.ruge.excel.handler;

import com.ruge.excel.converter.ReadConvertible;
import com.ruge.excel.converter.WriteConvertible;

/**
 * 爱丽丝、如歌  创建于 2018/10/16 15:18
 * 说明:  用来存储Excel标题的对象，通过该对象可以获取标题和方法的对应关系
 */
public class ExcelHeader implements Comparable<ExcelHeader> {
	/**
	 * excel的标题名称
	 */
	private String title;
	/**
	 * 每一个标题的顺序
	 */
	private int order;
	/**
	 * 写数据转换器
	 */
	private WriteConvertible writeConverter;
	/**
	 * 读数据转换器
	 */
	private ReadConvertible readConverter;
	/**
	 * 注解域
	 */
	private String filed;
	/**
	 * 属性类型
	 */
	private Class<?> filedClazz;

	@Override
	public int compareTo(ExcelHeader o) {
		return 0;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public int getOrder() {
		return order;
	}

	public void setOrder(int order) {
		this.order = order;
	}

	public WriteConvertible getWriteConverter() {
		return writeConverter;
	}

	public void setWriteConverter(WriteConvertible writeConverter) {
		this.writeConverter = writeConverter;
	}

	public ReadConvertible getReadConverter() {
		return readConverter;
	}

	public void setReadConverter(ReadConvertible readConverter) {
		this.readConverter = readConverter;
	}

	public String getFiled() {
		return filed;
	}

	public void setFiled(String filed) {
		this.filed = filed;
	}

	public Class<?> getFiledClazz() {
		return filedClazz;
	}

	public void setFiledClazz(Class<?> filedClazz) {
		this.filedClazz = filedClazz;
	}

	public ExcelHeader(String title, int order, WriteConvertible writeConverter, ReadConvertible readConverter, String filed, Class<?> filedClazz) {
		this.title = title;
		this.order = order;
		this.writeConverter = writeConverter;
		this.readConverter = readConverter;
		this.filed = filed;
		this.filedClazz = filedClazz;
	}
}
